package executable.instance.inheritance;

public class FieldInheritanceCalls {

    public static Object publicCreateA() {
        return new FieldInheritanceA();
    }

    public static Object publicCreateB() {
        return new FieldInheritanceB();
    }

    public static Object publicCreateC() {
        return new FieldInheritanceC();
    }

    public static int getFamilyNumberSumA() {
        return new FieldInheritanceA().getFamilyNumberSum();
    }

    public static int getFamilyNumberSumB() {
        return new FieldInheritanceB().getFamilyNumberSum();
    }

    public static int getFamilyNumberSumC() {
        return new FieldInheritanceC().getFamilyNumberSum();
    }

    public static int setAndGetA() {
        final FieldInheritanceA fieldInheritance = new FieldInheritanceA();
        fieldInheritance.setFamilyNumber(45642318);
        return fieldInheritance.getFamilyNumberSum();
    }

    public static int setAndGetB() {
        final FieldInheritanceA fieldInheritance = new FieldInheritanceB();
        fieldInheritance.setFamilyNumber(45642318);
        return fieldInheritance.getFamilyNumberSum();
    }

    public static int setAndGetC() {
        final FieldInheritanceA fieldInheritance = new FieldInheritanceC();
        fieldInheritance.setFamilyNumber(45642318);
        return fieldInheritance.getFamilyNumberSum();
    }

    public static int getNumber1OnC() {
        return new FieldInheritanceC().getNumber1();
    }

    public static int getNumber2OnC() {
        return new FieldInheritanceC().getNumber2();
    }

    public static int getNumber3OnC() {
        return new FieldInheritanceC().getNumber3();
    }
}
